#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2021/8/26 17:04
# @Author  : 李中华
# @Email   : 1260429766@qq.com
# @File    : login.py

from selenium import webdriver
import time
from common.logger import Log
from common.codecTools import urlCodecTool
from common.writeConfig import WriteConfig
from common.readConfig import ReadConfig
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait

option = webdriver.ChromeOptions()
option.add_argument('--ignore-certificate-errors')
driver = webdriver.Chrome(options=option)
logur = ReadConfig().getConfValue('mskjWebPlateform', 'logurl')
logurl = logur + "/#/login?redirect=%2Fdashboard"

driver.get(logurl)

el = WebDriverWait(driver,3,0.5).until(EC.presence_of_element_located((By.XPATH, "//input[@type='text']")))
el.click()
el.clear()
el.send_keys("admin")



